<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="favicon.ico"> <link href="__PUBLIC__/home/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/home/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/home/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/home/css/style.min.css?v=4.1.0" rel="stylesheet">

</head>

<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>新增工作日志</h5>
            </div>
            <div class="ibox-content">
                <form method="post" action="" class="form-horizontal" name="form1" id="valid_form" onkeydown="if(event.keyCode==13){return false;}">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">日志类型:</label>
                        <div class="col-sm-10">
                            <select class="form-control m-b" name="type">
                                <option value="1">会议</option>
                                <option value="2">实验课</option>
                                <option value="3">维修设备</option>
                                <option value="4">出差</option>
                                <option value="5">考试管理</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">内容:</label>
                        <div class="col-lg-6">
                            <div class="input-group">
                                <textarea type="text" name="content" class="form-control" id="content"></textarea>
                                <div class="input-group-btn">
                                    <button type="button" class="btn btn-white dropdown-toggle" data-toggle="dropdown">
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                    </ul>
                                </div>
                                <!-- /btn-group -->
                            </div>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <button class="btn btn-primary" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- 全局js -->
<script src="__PUBLIC__/home/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/home/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/home/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script type="text/javascript">
    var testBsSuggest=$("#content").bsSuggest({
        url: "work_json.html?content="+$("#content").val(),
        /*effectiveFields: ["userName", "shortAccount"],
        searchFields: [ "shortAccount"],
        effectiveFieldsAlias:{userName: "姓名"},*/
        getDataMethod: "url",
        effectiveFieldsAlias:{description:"描述",content:'内容'},
        effectiveFields: ["description","content"],
        keyField: "content", //以哪个为内容
        idField:'description',
        autoMinWidth: true,
        showBtn: false
    }).on('onDataRequestSuccess', function (e, result) {
        console.log('onDataRequestSuccess: ', result);
    }).on('onSetSelectValue', function () {
        console.log("onSetSelectValue");
    }).on('onUnsetSelectValue', function (e) {
        console.log("onUnsetSelectValue");
    });



    /**
     * 不显示下拉按钮
     */
</script>
</body>

</html>